<?php

$this->menu=array(	
	array('label'=>Yii::t('app', 'Create') . ' ' . $model->label(), 'url'=>array('create')),	
	array('label'=>Yii::t('app', 'Manage') . ' ' . $model->label(2), 'url'=>array('admin')),
);
?>

<h1><?php echo Yii::t('app', 'View') . ' ' . GxHtml::encode($model->label()) . ' ' . GxHtml::encode(GxHtml::valueEx($model)); ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data' => $model,
	'attributes' => array(
'id',
'name',
'inprice',
'inpercentage',
'apply_discount_to',
'restrict_by_date',
'valid_from_date',
'valid_to_date',
'maximum_number_of_redemptions_per_code',
'maximum_number_of_redemptions_per_user',
'maximum_number_of_prodcuts_to_discount',
'class_restriction',
'course_restriction',
'user_restriction',
'status',
'created',
	),
)); ?>

<h2><?php echo GxHtml::encode($model->getRelationLabel('classCourseCategoryUsersRestrictionCoupons')); ?></h2>
<?php
	echo GxHtml::openTag('ul');
	foreach($model->classCourseCategoryUsersRestrictionCoupons as $relatedModel) {
		echo GxHtml::openTag('li');
		echo GxHtml::link(GxHtml::encode(GxHtml::valueEx($relatedModel)), array('classCourseCategoryUsersRestrictionCoupon/view', 'id' => GxActiveRecord::extractPkValue($relatedModel, true)));
		echo GxHtml::closeTag('li');
	}
	echo GxHtml::closeTag('ul');
?>